import Component from "../Component.js";

export default class Viewrecover extends Component {
    constructor() {
        super();
    }


    template() {
        const recoverButton = `<div id="viewrecover"  class="GisUtilIcon" style="position: absolute;top: 150px;right: 25px;z-index: 999"><i class="fas fa-sync" /></div>`
        this.$$("body").append(recoverButton);
    }

    control() {
        const map = this.drawer.map
        const config = this.algo.getConfig();
        this.$$("#viewrecover").on("click", () => {
            console.log('回调视角')
            map.getView().setCenter(config.center);
        });
    }
}